#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

#ifndef FILEIO
#define main1258 main
#endif

int main1258(int argc,char **argv) 
{ 

#ifdef FILEIO
  freopen("1258in.txt","r",stdin); 
  freopen("1258out.txt","w",stdout); 
#endif

  int N;

  while(1)
  {
	 scanf("%d\n",&N);

	 if(N==0)
		 break;

	 for(int i=0;i<N;i++)
	 {
		 for(int j=0;j<N;j++)
		 {
		 }
	 }
  }
  

#ifdef FILEIO
  fclose(stdin);
  fclose(stdout);
#endif  
  
  return 0; 
}